import { createRouter, createWebHashHistory } from 'vue-router'
import index from '../components/index.vue'
import pingtai from '../components/pingtai.vue'
import pingtaiDetails from '../components/pingtaiDetails.vue'
import tosu from '../components/tosu.vue'
import zhengce from '../components/zhengce.vue'
import tobiao from '../components/tobiao/tobiao.vue'
import info from '../components/tobiao/info.vue'
import canyu from '../components/tobiao/canyu.vue'
import wode from '../components/tobiao/wode.vue'

var router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: "/",
      component: index,
      redirect: '/pingtai',
      children: [{
        path: "/pingtai",
        component: pingtai
      }, {
        path: "/pingtaiDetails",
        component: pingtaiDetails
      }, {
        path: "/tosu",
        component: tosu
      }, {
        path: "/zhengce",
        component: zhengce
      }, {
        path: "/tobiao",
        component: tobiao,
        redirect: '/info',
        children: [{
          path: "/info",
          component: info,
        }, {
          path: "/canyu",
          component: canyu,
        }, {
          path: "/wode",
          component: wode,
        }
        ]
      }
      ]
    }, {
      path: "/info",
      redirect: info,
    }

  ]

})

export default router;

